package com.wudl.govern.mapper;

import com.wudl.govern.domain.MonitorReport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author ：wudl
 * @date ：Created in 2022-04-05 21:47
 * @description：
 * @modified By：
 * @version: 1.0
 */

@Mapper
@Repository
public interface MonitorReportMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MonitorReport record);

    int insertSelective(MonitorReport record);

    MonitorReport selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MonitorReport record);

    int updateByPrimaryKey(MonitorReport record);

    /**
     * 通过条件查询质量监控报告
     * @param condition
     * @return
     */
    List<Map<String,Object>> selectByCondition(Map<String, Object> condition);

    /**
     * 通过条件查询质量监控报告(lz)
     * @param condition
     * @return
     */
    List<Map<String,Object>> selectReportList(Map<String, Object> condition);

    /**
     * 按executeId逻辑删除一条质量监控报告
     * @param reportId
     * @return
     */
    int deleteOne(@Param("reportId") Integer reportId);



    /**
     * 查询日志id集合
     * @param id
     * @return
     */
    List<Integer> selectLogIds(@Param("id")Integer id);

    /***
     * 根据任务id查询报告信息
     * @param taskId
     * @return
     */
    Map<String,String> selectReportByTaskId(@Param("taskId") String taskId);

    /***
     * 修改监控汇总信息
     * @param taskId
     * @return
     */
    int updateMonitorinfo(@Param("taskId") String taskId);
}